Repository navigation
XL-2: a match arm keeps its own refusal cause in every arm position; the value reader carries the fold's refusal - #12321
gunbai-bot[bot] wants to merge 6 commits into
Conversation
…ng it as navigation Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…on; share its front end Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… (survives #12208 deleting the list-literal cause) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
# Conflicts: # src/v2/workflow/floor_pure_producer_share.dag
briansrls
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at exact head 8af19cb. Do not enqueue this head yet.
The production direction is sound: decide comma-repeat versus arm shape before wiring, wire once, retain Rejected diagnostics, and use one arm-body reader. I am not alleging that these changes themselves produce an incorrect locus. Two acceptance-evidence gaps remain:
- The located-refusal property is not tested. In src/v2/test/claim/namespace_xl0/match_arm_refusal_carried_test.dag, MarcFileRefused retains only fatal_reason. marc_verdict_in throws away any ability to check the diagnostic's actual locus, and marc_same_located_cause checks only equal non-navigation reasons. a_first_arm_specimen_still_refuses_located compares the first verdict with itself. These checks can all remain green if the right reason is reported at the whole arm, the wrong node, or no usable locus. That is precisely the distinction XL-2 needs.
Keep the relational reason checks and the accepting controls; add a discriminating production-boundary witness that inspects the actual diagnostic occurrence/location and resolves it against each specimen's own offending body/source-span evidence, rather than accepting the enclosing arm. A small lower-level witness alongside the current integration suite is sufficient; no broad context-carrier rewrite is requested. The three source strings have different layouts, so do not compare their raw numeric offsets to one another. A deliberate wrong/enclosing-arm locus must make this witness red. This need not pin the retiring list_literal_unlowered reason.
- Complete or supply the promised census handback. The PR explicitly says hand-off waits for the full census, but the only posted receipt still covers 1,000 / 6,778 files, comparing main 69e0bb7 against intermediate 7692619. There is no completion comment as of this review. Please append the completed paired population, terminal completeness, source/binary identities, and dispositions for changed rows. Bind it to the reviewed production changes, or document production-code equivalence if the completed run used an earlier head. The broader body_lower_value_lowered rejection change warrants honoring the already-declared handback condition. A green workflow is not that receipt.
Arms 3+ and the enclosing-control-expression silent drop correctly remain separate work. Do not expand this repair to solve those before returning; close the two bounded evidence gaps above, then request exact-head re-review. I reviewed source and posted CI/author evidence, not a fresh local execution.
… enclosing arm Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… under the mutation they named); share marl_outcomes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Closing as superseded by #12299 (merged e4bdd90), which landed all three of this PR's fixes: value-reader refusal propagation, the arm body read through the value reader with the operand fallback deleted, and comma-arm heads keeping non-navigation refusals. #12299's value_read_refusal witness asserts the refusal locus is the value itself (not match/=>/if/let), including a second arm, which covers the locus-discrimination gap review 5326092139 raised here. The remaining fold work (match arms 3+) continues in #12327. — sent from quiet-seal-543 |
What
v2 body lowering now keeps a match arm's own refusal cause in every arm position. It no longer re-reads a refused arm under the wrong shape and reports
body_lowering_reason_match_arm_navigation_refused, which carried the arm as its only locus.XL-2 fold cleanup, item (1) (the fall-back reader). Owner: quiet-seal-543.
The chain, and where it first went wrong
I bisected
dag/gunbc/accelerator_demo/accelerator_demo_eval.dagdown to its smallest refusing shape. The refusal is not specific to lists, nesting orif: a refusable value in any match arm after the first (or in a comma-separated arm) refuses as navigation. The same value in the first arm refuses located. I tagged each of the 14body_lower_match_arm_navigation_rejectcallers to find the one that fires. The earliest unjustified link was one step above the arm wiring:body_lower_extract_comma_list_arm_head, the earliest wrong link. It wired the node as an arm and, on anyRejected, discarded the diagnostics and retried the same node as a comma-repeat element. An arm that refused for its own located cause was re-read under the wrong shape, and the retry answered navigation. Repair: decide the shape first, then wire once, and letRejectedstand. A repeat element isSeq(optional-comma, arm), so its left side is a separator, asbody_lower_match_arm_repeat_elem_is_separatoralready decides; an arm's left side is its pattern, which never is.body_lower_match_arm_from_comma_repeat_elemis deleted: it had no other caller.body_lower_value_lowered, the brief's link. When the bottom-up fold refused, it handed the raw value to the top-down walker, discarding the fold's cause. It now carries the fold'sRejected.body_lower_value_lowered, but the two spine arm paths used the operand reader alone. All three now go throughbody_lower_match_arm_wired(value reader first, itsRejectedcarried; the operand reader only when it answersAbsent). This is §3: one question, one authority.Witness
v2.test.claim.namespace_xl0.match_arm_refusal_carriedcovers five inline modules through the native front end. Each is judged by the fatal cause of its file refusal.a_second_arm_refuses_under_the_cause_the_first_arm_reachesa_comma_separated_arm_refuses_under_the_cause_the_first_arm_reachesa_first_arm_specimen_still_refuses_located(control)a_second_arm_with_no_refusable_value_is_not_refused(control)a_comma_separated_arm_with_no_refusable_value_is_not_refused(control)Both sides were run with local
claim_batch, same binary, with only the fold file swapped. Each claim costs about 1.48M eval steps, almost all of it the shared front end, somarc_outcomesis enrolled WARM inv2.workflow.floor_pure_producer_share, asiasl_outcomesis.Why the claims are relational. The specimen is a list literal, the shape the corpus specimen refused on. The claims do not name
body_lowering_reason_list_literal_unlowered, because #12208 deletes that cause when it lowers lists. They assert instead that arm position does not change the cause. If a later change lowers the specimen,a_first_arm_specimen_still_refuses_locatedgoes red by name and the specimen value is replaced, rather than three accepts greening the relational claims.Identity census (main
69e0bb7566evs head7692619dc7a, the fold change alone)Instrument:
native_test_context_from_ingestfile_refusals, one ingest per path,head_reasonandfatal_reason. It ran remotely in batches of 25, same binary on both sides, with only the checkout differing. Coverage so far is PARTIAL: 1,000 of 6,778.dagfiles underdag/andsrc/v2/are paired. The rest is running in waves against BuildBuddy's 1-hour cap, and the full table will be posted as a PR comment. Hand-off to the parent waits on the full census; the PR is marked ready now only so CI and the floor can plan the witness in parallel.27 of the 1,000 paired files change. No file goes from refused on main to accepted on head.
match_arm_navigation_refusedlist_literal_unloweredmatch_arm_navigation_refusedcall_argument_unreadcall_argument_unread/list_literal_unloweredlist_literal_unlowereddag/gunbc/bmc/bmc_converge.dagis accepted with 436 of 1,193 authored atoms dropped and 0 refused, anddag/gunbc/fleet/fleet_desired_observe.dagis accepted with 74 of 280 dropped (reference_conservation_census_for_pathson main). The fold refused, the walker accepted by dropping, and DESIGN §4b forbids that silent state outright.Not in this PR (so this PR is not read as closing them)
v2.test.claim.body_lowering.single_arm_matchpins that drop today.body_lower_find_control_form_optional(a record, call or binary expression containing a block lowers to the block alone) is not touched here. It is a separate queue item.as-cast operand is accepted in every arm position on both sides, which means it is carried, not refused. That is item (4)'s evidence, recorded here.Carrier wording (for
compiler_frontend_program_status, not edited here)Stage0
No generated stage0 file derives from the changed functions, so none is installed.
Other
The census ran with a per-batch child cgroup
memory.maxbound after the build, notGUNBC_MEMORY_BUDGET_BYTES. The parent agreed: the budget variable is the refusal-bypass DESIGN §5 forbids. No catch-all binder arm over anRc-held coproduct was added, so the knownread.clone()E0308 emitter defect is not exercised.🤖 Generated with Claude Code